<template>
  <div>
    数字：{{ number }}
  </div>

  <button @click="addNumber">number++</button>
  <button @click="delNumber">number--</button>
</template>

<script setup>
import {ref} from 'vue'
let number =ref(1)
const addNumber=()=>{
  number.value++
}
const delNumber =()=>{
  number.value--
}
</script>